<extend name="Base/common"/>
<block name="header">
<header class="jumbotron subhead" id="overview">
    <div class="container">
        <h2>重置密码</h2>
        <p><small>如果您已经忘记您的密码，您可以在此提交您的注册帐号或手机号重置密码，为安全起见，邮箱帐号只作为接收重置链接用途。</small></p>
    </div>
</header>
</block>
<block name="body">
    <div class="container">
        <div class="row">

            <div class="col-sm-12 col-md-8">
                <form class="form-horizontal" action="{:U()}" role="form" method="post">
                    <div class="form-group">
                        <label for="inputName" class="col-sm-3 control-label">帐号或手机号：</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="inputName" name="inputName" placeholder="请输入您的帐号或手机号">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label" for="inputVerify">验证码:</label>
                        <div class="col-sm-9">
                            <input type="text" id="inputVerify" placeholder="请输入验证码"  errormsg="请填写5位验证码" nullmsg="请填写验证码" datatype="*5-5" name="verify">
                            <a href="javascript:" class="reloadverify">看不清换一个</a>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label" ></label>
                        <div class="col-sm-9">
                            <img class="verifyimg reloadverify" alt="点击切换" src="{:U('verify')}" style="cursor:pointer;">
                        </div>
                        <div class="Validform_checktip text-warning"></div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-offset-3">
                            <button type="submit" class="btn btn-primary btn-lg">提交</button>
                        </div>
                    </div>
                </form>
            </div>

        </div>
    </div>
</block>

<block name="script">
    <script>
        //刷新验证码
        $(function(){
            var verifyimg = $(".verifyimg").attr("src");
            $(".reloadverify").click(function(){
                if( verifyimg.indexOf('?')>0){
                    $(".verifyimg").attr("src", verifyimg+'&random='+Math.random());
                }else{
                    $(".verifyimg").attr("src", verifyimg.replace(/\?.*$/,'')+'?'+Math.random());
                }
            });
        });
    </script>
</block>